



//获取当前登录用户的 id 
function getMyId() {
    var myId = -1;
    jQuery.ajax({
        type: "POST",
        url: "/user/myid",
        async: false,
        data: {},
        success: function(result) {
            if(result != null && result.code == 200) {
                //获取成功
                myId = result.data;
            } else {
                alert("当前登录用户 id 获取失败!");
            }
        }
    });
    return myId;
}

//当前登录用户 id
var myId = getMyId();